﻿using System;
using System.Web;
using OfficeClip.OpenSource.Logger;

namespace Logger.Net
{
    public class Global : System.Web.HttpApplication
    {
        public static Log Log;
        protected void Application_Start(object sender, EventArgs e)
        {
            Log = new Log(Server.MapPath("logger.xml"));
            //Log.FileLog.LogFolder = Server.MapPath("log"); // If this folder is not accessible, change the path here or in logger.xml
            Log.WriteInfo("State", "Logger Started");
        }

        protected void Application_End(
            object sender,
            EventArgs e)
        {
            Log.WriteInfo("State", "Logger Ended");
        }
    }
}